package com.jpm.jrogue
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import starling.core.Starling;
	
	
	/**
	 * ...
	 * @author Jonboy
	 */
	[Frame(factoryClass="com.jpm.jrogue.Preloader")]
	[SWF(width="1200",height="700",frameRate="30",backgroundColor="#000000")]
	public class Main extends Sprite
	{
		private var mStarling:Starling;
		
		public function Main():void
		{
			if (stage)
				init();
			else
				addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			startup();
		}
		
		public function startup():void
		{
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			mStarling = new Starling(Game, stage);
			mStarling.start();
		}
	
	}

}